<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>

</body>
</html><!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <title>Title</title>
    <meta name="viewport" content="width=device-width, initial-scale=1.0,maximum-scale=1.0, user-scalable=no"/>
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"/>
    <meta name="renderer" content="webkit">
    <link rel="stylesheet" href="../mdui/css/mdui.min.css">
    <script defer src="../mdui/js/mdui.min.js"></script>
    <script src="../js/axios.min.js"></script>
    <script src="../js/qs.min.js"></script>
    <script src="../js/common.js"></script>
    <script src="../js/vue.js"></script>

</head>
<body class="mdui-theme-primary-indigo mdui-theme-accent-green">


<div class="mdui-container-fluid" id="app">
    <h1 class="mdui-text-color-theme">会议列表</h1>

    <div style="margin-bottom: 9px;">
        <a href="/meeting/add.html
    " class="mdui-btn mdui-btn-raised mdui-ripple mdui-color-theme-accent">申请</a>
    </div>
    <table class="mdui-table mdui-table-hoverable">
        <thead>
        <tr>
            <th>编号</th>
            <th>发起人</th>
            <th>会议时间</th>
            <th>会议主题</th>
            <th>会议内容</th>
            <th>会议室</th>
            <th>查看</th>
        </tr>
        </thead>
        <tbody>
        <tr v-for="(m,index) in meetings">
            <td>{{m.id}}</td>
            <td>{{m.useriinfo.name}}</td>
            <td>{{m.meetingDate}}--{{m.startTime}}</td>
            <td>{{m.title}}</td>
            <td>{{m.content}}</td>
            <td>{{m.meetingRoom.roomName}}</td>
            <td>
                <button @click="viewMeeting(m.id)" class="mdui-btn mdui-btn-icon ">
                    <i class="mdui-icon material-icons">pageview</i>
                </button>
            </td>
        </tr>
        </tbody>
    </table>


</div>

<script>
    let vm = new Vue({
        el: "#app",
        data: {
            meetings: []
        },
        created() {
            this.findList();
        },
        filters: {},

        methods: {
            viewMeeting(mid) {
                location.href = "view.html?id=" + mid
            },

            findList() {
                let _this = this;
                axios.get("/meeting/list")
                    .then(function (res) {
                        _this.meetings = res.data
                    })
            }
        }
    });

</script>
</body>
</html>